package com.gpStudy.design.classLoader;

public class LoadTest2 {

    public static class Inner{//静态内部类中的静态熟悉和静态代码块按照顺序加载

        static {
            System.out.println("Innter Static!");
        }
        {
            System.out.println("-----------------");
        }
        public static LoadTest2 load = new LoadTest2(3);
        static int k = 10;
        static {
            System.out.println("Innter Static2!" + k);
        }


    }

    public static LoadTest2 getInstance()
    {
        return Inner.load;
    }

    LoadTest2(int value)
    {
        System.out.println("Construct "+value);
    }

    static {
        System.out.println("LoadTest Static!");
    }

    public static LoadTest2 loadout = new LoadTest2(1);

    public static void main(String[] args) {
        LoadTest2 load = new LoadTest2(2);
        load.getInstance();
        LoadTest2.getInstance();
        //new LoadTest2.Inner();
    }
}
